
// Copyright (c) 2002 HTHK
package com.ffpc.sql;

import java.sql.SQLException;

/**
 * A Class class.
 * <P>
 * @author HTHK
 */
public class DataException
  extends Exception
{
  private String actionError=null;
  /**
   * Constructor
   */
  public DataException() {
  }

  public DataException(String s)
  {
        super(s);
        actionError = s;
  }

  public DataException(SQLException e)
  {        
        super(e.getMessage(), e);
        actionError = e.getMessage();
        //actionError = new String("error.sql.database");
  }

  public DataException(Exception e)
  {
        super(e.getMessage(), e);
        actionError = e.getMessage();
        //actionError = new String("error.sql.exception");
  }

  public String getActionError()
  {
        return actionError;
  }

  @Override
public String getMessage()
  {
        return super.getMessage();
  }

  @Override
public String toString()
  {
        return super.toString();
  }
}

